{include file="$header" /}
<section class="mk-cms-warp">
    <aside class="aside">
        <section class="aside-wrap">
            <div class="side-title">{{lang('Categories')}}</div>
            <el-tree :data="treeData">
                <span class="custom-tree-node" slot-scope="{ node, data }">
                    <a :href="data.url">{{data.title}}</a>
                </span>
            </el-tree>
        </section>
    </aside>
    <div class="main">
        <div class="main-title">{$catalog.title}</div>
        {empty name="list"}
        <el-empty description="{:lang('No data')}"></el-empty>
        {else/}
        <div class="main-list">
            <ul>
                {volist name="list" id="vo"}
                <li class="news-item">
                    <figure class="item-wrap">
                        <figcaption class="item-info">
                            <h3 class="item-title"><a href="{$vo.url}">{$vo.title}</a></h3>
                            <time>{$vo.create_time}</time>
                            <div class="item-detail">{$vo.seo_description}</div>
                            <a href="{$vo.url}" class="item-more">{:lang('Read more')}</a>
                        </figcaption>
                    </figure>
                </li>
                {/volist}
            </ul>
        </div>
        {$page|raw}
        {/empty}
    </div>
</section>
{include file="$component" /}
<script type="text/javascript">
    new Vue({
        el: '#app',
        data() {
            return {
                treeData: {:json_encode(get_catalog_child($catalog.class1))},
            }
        },
    });
</script>
{include file="$footer" /}